package com.hlf.modules.merchant.store.controller;


import com.hlf.modules.merchant.store.entity.Mcc;
import com.hlf.modules.merchant.store.service.MccService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("mcc")
public class MccController {

	@Autowired
	private MccService mccService;
	
	@ResponseBody
	@RequestMapping(value ="/{firstType}/{secondType}/selectMccByType")
	public List<Mcc> selectMccByType(Mcc mcc){
		return mccService.selectMccByType(mcc);
	}
	
	@ResponseBody
	@RequestMapping(value ="/{firstType}/selectSecondTypeByFirst")
	public List<Integer> selectSecondTypeByFirst(@PathVariable("firstType") int firstType){
		return mccService.selectSecondTypeByFirst(firstType);
	}
}
